﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net;
using System.Net.Mail;
//using SendGridMail;
//using SendGridMail.Transport;

namespace AG.Apps.WebServices
{
    public class EmailSender
    {

        //public static void SendMail(string EmailAddress, string Key)
        //{
        //    MailMessage mailMsg = new MailMessage();

        //    mailMsg.To.Add(new MailAddress(EmailAddress));

        //    mailMsg.From = new MailAddress("azure_b8a1efd4b05432cf5748ec5ac9903b23@azure.com", "From PermissionExplorer");

        //    mailMsg.Subject = "Successfull subcription";
        //    string text = "You buy full version of Permission Explorer for SharePoint 2013, this is your new key: "+Key;
        //    mailMsg.Body = text;

        //    SmtpClient client = new SmtpClient();

        //    client.Port = 25;

        //    client.Host = "smtp.sendgrid.net";

        //    client.Timeout = 10000;

        //    client.DeliveryMethod = SmtpDeliveryMethod.Network;

        //    client.UseDefaultCredentials = false;

        //    client.Credentials = new System.Net.NetworkCredential("azure_b8a1efd4b05432cf5748ec5ac9903b23@azure.com", "vxt7l9hu");
        //    client.Send(mailMsg);
        //}

    }
}